using System.Collections;
using System.Collections.Generic;
using System.Linq;
using ns20;

namespace Newtonsoft.Json.Linq
{
	public struct JEnumerable<T> : IEnumerable<T>, IJEnumerable<T>, IEnumerable where T : JToken
	{
		public static readonly JEnumerable<T> Empty = new JEnumerable<T>(Enumerable.Empty<T>());

		private readonly IEnumerable<T> ienumerable_0;

		public IJEnumerable<JToken> this[object key] => new JEnumerable<JToken>(ienumerable_0.smethod_0<T, JToken>(key));

		public JEnumerable(IEnumerable<T> enumerable)
		{
			Class204.smethod_2(enumerable, "enumerable");
			ienumerable_0 = enumerable;
		}

		public IEnumerator<T> GetEnumerator()
		{
			return ienumerable_0.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		public override bool Equals(object obj)
		{
			if (obj is JEnumerable<T>)
			{
				return ienumerable_0.Equals(((JEnumerable<T>)obj).ienumerable_0);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return ienumerable_0.GetHashCode();
		}
	}
}
